package su.order.dto;


import net.kuakao.core.base.util.SystemUtils;
import net.kuakao.core.dto.PagerDTO;
import su.order.entity.OrderProductEntity;
public class OrderProductDto extends PagerDTO {
	/** 备货状态，未备货 */
	public final static int STORAGE_STATUS_NO = 0;
	/** 备货状态，已备货 */
	public final static int STORAGE_STATUS_OK = 1;
	/** 发票审核状态，未开票 */
	public final static int INVOICE_STATUS_NO = 0;
	/** 发票审核状态，未审核 */
	public final static int INVOICE_STATUS_READY = 1;
	/** 发票审核状态，已审核 */
	public final static int INVOICE_STATUS_OK = 2;
	
	/* ID */
	private String  id;
			
			
	/* 订单ID */
	private String  orderId;
			
			
	/* 产品ID */
	private String  productId;
			
			
	/* 客户要求的产品名 */
	private String  custname;
			
			
	/* 包装名称 */
	private String  packname;
			
			
	/* 数量 */
	private String  num;
			
			
	/* 订单报价 */
	private String  opprice;
			
			
	/* 备货状态(0未备货，1已备货) */
	private String  storageStatus;
			
			
	/* 仓库备货时间 */
	private String  storageTime;
			
			
	/* 发票审核状态(0未开票，1未审核，2已审核) */
	private String  invoiceStatus;
			
			
	/* 理论提成 */
	private String  payment;
			
			
	/* 实际提成 */
	private String  realPayment;
			
			
	/* 开票日期 */
	private String  invoiceTime;
			
			
	/* 包装件数 */
	private String  packageNum;
			
			
	/* 运费 */
	private String  freight;
			
			
	/* 根据产品公式设置得到的税金 */
	private String  tax;
			
			
	/* 利润 */
	private String  margin;
			
			
	/* 即时信息快照_出厂价 */
	private String  ccprice;

	public String  getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
			
	public String  getOrderId() {
		return orderId;
	}
	
	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
			
	public String  getProductId() {
		return productId;
	}
	
	public void setProductId(String productId) {
		this.productId = productId;
	}
			
	public String  getCustname() {
		return custname;
	}
	
	public void setCustname(String custname) {
		this.custname = custname;
	}
			
	public String  getPackname() {
		return packname;
	}
	
	public void setPackname(String packname) {
		this.packname = packname;
	}
			
	public String  getNum() {
		return num;
	}
	
	public void setNum(String num) {
		this.num = num;
	}
			
	public String  getOpprice() {
		return opprice;
	}
	
	public void setOpprice(String opprice) {
		this.opprice = opprice;
	}
			
	public String  getStorageStatus() {
		return storageStatus;
	}
	
	public void setStorageStatus(String storageStatus) {
		this.storageStatus = storageStatus;
	}
			
	public String  getStorageTime() {
		return storageTime;
	}
	
	public void setStorageTime(String storageTime) {
		this.storageTime = storageTime;
	}
			
	public String  getInvoiceStatus() {
		return invoiceStatus;
	}
	
	public void setInvoiceStatus(String invoiceStatus) {
		this.invoiceStatus = invoiceStatus;
	}
			
	public String  getPayment() {
		return payment;
	}
	
	public void setPayment(String payment) {
		this.payment = payment;
	}
			
	public String  getRealPayment() {
		return realPayment;
	}
	
	public void setRealPayment(String realPayment) {
		this.realPayment = realPayment;
	}
			
	public String  getInvoiceTime() {
		return invoiceTime;
	}
	
	public void setInvoiceTime(String invoiceTime) {
		this.invoiceTime = invoiceTime;
	}
			
	public String  getPackageNum() {
		return packageNum;
	}
	
	public void setPackageNum(String packageNum) {
		this.packageNum = packageNum;
	}
			
	public String  getFreight() {
		return freight;
	}
	
	public void setFreight(String freight) {
		this.freight = freight;
	}
			
	public String  getTax() {
		return tax;
	}
	
	public void setTax(String tax) {
		this.tax = tax;
	}
			
	public String  getMargin() {
		return margin;
	}
	
	public void setMargin(String margin) {
		this.margin = margin;
	}
			
	public String  getCcprice() {
		return ccprice;
	}
	
	public void setCcprice(String ccprice) {
		this.ccprice = ccprice;
	}
			

	public OrderProductEntity toOrderProductEntity() {
		OrderProductEntity orderProductEntity = new OrderProductEntity();
		orderProductEntity.setId(SystemUtils.strToInt(this.id));
		
		orderProductEntity.setOrderId(SystemUtils.strToInt(this.orderId));
		
		orderProductEntity.setProductId(SystemUtils.strToInt(this.productId));
		
		orderProductEntity.setCustname(this.getCustname());
		
		orderProductEntity.setPackname(this.getPackname());
		
		orderProductEntity.setNum(SystemUtils.strToDouble(this.num));
		
		orderProductEntity.setOpprice(SystemUtils.strToDouble(this.opprice));
		
		orderProductEntity.setStorageStatus(SystemUtils.strToInt(this.storageStatus));
		
		orderProductEntity.setStorageTime(SystemUtils.strToDate(this.storageTime,"yyyy-MM-dd"));
		
		orderProductEntity.setInvoiceStatus(SystemUtils.strToInt(this.invoiceStatus));
		
		orderProductEntity.setPayment(SystemUtils.strToDouble(this.payment));
		
		orderProductEntity.setRealPayment(SystemUtils.strToDouble(this.realPayment));
		
		orderProductEntity.setInvoiceTime(SystemUtils.strToDate(this.invoiceTime,"yyyy-MM-dd"));
		
		orderProductEntity.setPackageNum(SystemUtils.strToInt(this.packageNum));
		
		orderProductEntity.setFreight(SystemUtils.strToDouble(this.freight));
		
		orderProductEntity.setTax(SystemUtils.strToDouble(this.tax));
		
		orderProductEntity.setMargin(SystemUtils.strToDouble(this.margin));
		
		orderProductEntity.setCcprice(SystemUtils.strToDouble(this.ccprice));
		
		return orderProductEntity;
	}
}

